function formatDate(value) {
	var year = value.year+1900;
	var month = value.month+1;
	var date = value.date;
	if(month<10){
		month = "0"+month;
	}
	if(date<10){
		date = "0"+date;
	}
	return year+"-"+month+"-"+date;
	
}

function formatDateTime(value) {
	var year = value.year+1900;
	var month = value.month+1;
	var date = value.date;
	var hours = value.hours;
	var minutes = value.minutes;
	var seconds = value.seconds;
	if(month<10){
		month = "0"+month;
	}
	if(date<10){
		date = "0"+date;
	}
	if(hours<10){
		hours = "0"+hours;
	}
	if(minutes<10){
		minutes = "0"+minutes;
	}
	if(seconds<10){
		seconds = "0"+seconds;
	}
	return year+"-"+month+"-"+date+" "+hours+":"+minutes+":"+seconds;
	
}
